/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
$(function(){
    $('#tj').click(function(){
        var fy = $('#fy').val();
        var kzrq = $('#kzrq').val();
        if(fy==""||fy==null){
            $.toast("费用不能为空！", "forbidden");
            return;
        }
        if(kzrq==""||kzrq==null){
            $.toast("开支日期不能为空！", "forbidden");
            return;
        }
        $.showLoading();
        var o = new AjaxOptions();
        o.put('service_code', 'P90011');
        o.put('fy', fy);
        o.put('kzrq', kzrq);
        o.put('gd', $('#gd').val());
        o.put('hxxm', $('#hxxm').val());
        o.put('hxyt', $('#hxyt').val());
        o.sus = function (data) {
            $.hideLoading();
            var sj = Math.random();
            $.toast("操作成功");
            window.location.href = window.location.href + sj;
        };
        o.fal = function (code, desc) {
            $.hideLoading();
            if (code == "9001101") {
                $.toast("日常花销保存失败！", "forbidden");
            }
        };
        $.ajax(o);
        
    });
    
});

